<layout name='Layout/layout_page' />
	
	<ol class="breadcrumb">
		<li><a href="<{:U('Order/index')}>">订单管理</a></li>
      	<li class="active">订单列表</li>
    </ol>

    <form class="form-inline" method="get" action="index.php">
  		<div class="form-group">
    		<label>会员编号：</label>
    		<input type="text" class="form-control input-sm" name="userid" value="<{$userid}>">
  		</div>
  		<div class="form-group">
    		<label>订单编号：</label>
    		<input type="text" class="form-control input-sm" name="order_no">
  		</div>
  		<div class="form-group">
    		<label>日期：</label>
    		<input type="text" name="startDate" id="startDate" class="form-control input-sm"> - <input type="text" name="endDate" id="endDate" class="form-control input-sm">
  		</div>
  		<script> 
		$(function(){
			$("#startDate" ).datepicker(); 		
			$("#endDate" ).datepicker(); 					
		});
		</script>
		<button type="submit" class="btn btn-default btn-sm">搜索</button>
		<input type="hidden" name="g" value="Admin" />
		<input type="hidden" name="m" value="Order" />
		<input type="hidden" name="a" value="index" />
	</form>


	<p></p>

	<form id="ajaxForm" method="post" action="<{:U('Order/del')}>" name="form1" class="form-horizontal form-validata">
	<TABLE class="table table-hover table-bordered" border="0" cellSpacing="0" cellPadding="0" width="100%">
	  <THEAD>
		<tr>
		  <TH><input class="checkall" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/> 全选</TH>
		  <TH>订单编号</TH>
		  <TH>会员编号</TH>
		  <TH>应付金额</TH> 
		  <TH>联系人</TH> 
		  <TH>电话</TH> 
		  <TH>地址</TH> 
		  <TH>支付方式</TH> 
		  <TH>是否支付</TH> 
		  <TH>是否处理</TH> 
		  <TH>提交日期</TH>
		  <TH>操作</TH>
		</tr>
	  </THEAD>
	  <TBODY>             
			<volist name="list" id="vo">
			<tr>
			  <td><eq name="vo.payStatus" value="0"><input type="checkbox" name="selectedids[]" value="<{$vo.id}>" id="<{$vo.id}>"> <{$vo.id}></eq></td>
			  <td><{$vo.order_no}></td>			  
			  <td><{$vo.memberID}></td>
			  <td><{$vo.money}></td>
			  <td><{$vo.name}></td>	  
			  <td><{$vo.mobile}></td>	  
			  <td><{$vo.address}></td>	  
			  <td><eq name="vo.payType" value="1">支付宝<else/>微信支付</eq></td>	  
			  <td><eq name="vo.payStatus" value="0"><font color="red">未支付</font><else/><font color="green">已支付</font></eq></td>	  
			  <td>
			  <eq name="vo.payStatus" value="1">
			  <eq name="vo.status" value="0">
              	<a href="<{:U('Order/change' , array('id'=>$vo['id'],'state'=>1))}>" class="btn btn-sm btn-danger">未处理</a>
              <else/>
              	<a href="<{:U('Order/change' , array('id'=>$vo['id'],'state'=>0))}>" class="btn btn-sm btn-success">已处理</a>              	
              </eq>
              </eq>
			  </td>	  
              <td><{$vo.createTime|date='Y-m-d H:i:s',###}></td>
			  <td>
			  <a href="<{:U('Order/view' , array('id'=>$vo['id']))}>" class="btn btn-default btn-sm">订单详情</a>
			  </td>
			</tr>
			</volist>
	  </TBODY>
	</TABLE>

	<div class="row">
		<div class="col-md-6">
			<button class="btn btn-info btn-sm" onClick="if(!confirm('删除后不可恢复！确定吗？'))return false;"><i class="glyphicon glyphicon-trash"></i> 删除选中信息</button>
		</div>
		
		<div class="col-md-6">
			<div class="page">
				<nav>
  					<ul class="pagination"><{$page}></ul>
  				</nav>
  			</div>
		</div>
	</div>
	</form>

<input type="hidden" id="menu_action" value="order" />